#include<bits/stdc++.h>
using namespace std;
#define int long long

int fun(int m, int n) {
	if (m == 0 || n == 1)
		return 1;
	if (n > m)
		return fun(m, m);
	else
		return fun(m, n - 1) + fun(m - n, n);
}

signed main() {
	int m, n;
	cin >> m >> n;
	cout << fun(m, n);
	return 0;
}
